package com.ruoyi.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.domain.entity.Common;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 咨询订单对象 p_order
 *
 * @author ruoyi
 * @date 2022-07-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("p_order")
public class POrder extends BaseEntity {

    private static final long serialVersionUID=1L;

    /**
     *
     */
    @TableId(value = "id")
    private Long id;

    @ApiModelProperty(value = "订单号")
    private String orderNo;
    /**
     * 订单标题
     */
    private String title;
    /**
     * 用户id
     */
    private Long userId;

    @TableField(exist = false)
    @ApiModelProperty(value = "用户名")
    private String username;
    /**
     * 咨询师id
     */
    private Long adviserId;

    @TableField(exist = false)
    @ApiModelProperty(value = "咨询师名称")
    private String adviserName;

    @TableField(exist = false)
    @ApiModelProperty(value = "咨询师等级")
    private String adviserLevelInfo;

    @TableField(exist = false)
    @ApiModelProperty(value = "咨询师头像")
    private String wxAvatar;

    @TableField(exist = false)
    @ApiModelProperty(value = "标签")
    private List<Common> goodWays;

    @TableField(exist = false)
    @ApiModelProperty(value = "标签(字符串)")
    private String goodWaysString;

    /**
     * 服务类型 0 立即咨询 1 预约咨询 2 文字咨询 3 包月套餐
     */
    @ApiModelProperty(value = "服务类型 0 立即咨询 1 预约咨询 2 文字咨询 3 包月套餐")
    private String serviceType;

    @TableField(exist = false)
    @ApiModelProperty(value = "咨询类别名字")
    private String serviceTypeName;
    /**
     * 是否使用优惠券 0 否 1 是
     */
    @ApiModelProperty(value = "是否使用优惠券 0 否 1 是")
    private String isCoupon;
    /**
     * 开始时间
     */
    @ApiModelProperty(value = "开始时间")
    private Date startTime;
    /**
     * 咨询时长
     */
    @ApiModelProperty(value = "咨询时长")
    private String timeSize;
    /**
     * 咨询类型
     */
    @ApiModelProperty(value = "咨询类型")
    private Long askType;

    /**
     * 咨询类型名称
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "咨询类型名称")
    private String askTitle;

    /**
     * 预约时间
     */
    @ApiModelProperty(value = "预约时间")
    private Date appointmentTime;

    @ApiModelProperty(value = "预约时间段")
    private String eventPeriod;

    /**
     * 订单金额
     */
    @ApiModelProperty(value = "订单金额")
    private BigDecimal price;
    /**
     * 订单状态 0 待付款 1 待咨询 2 待评价 3 已完成 4 已取消
     */
    @ApiModelProperty(value = "订单状态 0 待付款 1 待咨询 2 待评价 3 已完成 4 已取消")
    private String orderStatus;
    /**
     * 支付类型 0 余额 1 微信
     */
    @ApiModelProperty(value = "支付类型 0 余额 1 微信")
    private String payType;
    /**
     * 订单备注
     */
    @ApiModelProperty(value = "订单备注")
    private String remark;
    /**
     * 取消原因
     */
    @ApiModelProperty(value = "取消原因")
    private String returnRemark;
    /**
     * 订单类型 0 测试订单 1 咨询订单
     */
    @ApiModelProperty(value = "订单类型 0 测试订单 1 咨询订单")
    private String orderCategory;
    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @TableLogic
    private String delFlag;

    @ApiModelProperty(value = "购物券id")
    private Long couponId;

    @ApiModelProperty(value = "购物券抵押金额")
    private BigDecimal couponPrice;

    @ApiModelProperty(value = "实际付款")
    private BigDecimal actualPrice;

    @ApiModelProperty(value = "咨询题目id")
    private Long topicId;

    @ApiModelProperty(value = "是否在线")
    @TableField(exist = false)
    private boolean isOnline;

    @ApiModelProperty(value = "用户电话")
    @TableField(exist = false)
    private String phone;

    @ApiModelProperty(value = "咨询师电话")
    @TableField(exist = false)
    private String phones;
}
